﻿using CIS.Common.Dtos.CommandDtos;
using CIS.Common.Dtos.ReportDtos;
using CIS.Common.Entitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CIS.Server.Manager.Equipment
{
    public interface IEquipmentManager
    {
        #region Port 相关
        Task<PortEntity> GetPortByPortIdAsync(string portId);
        Task<List<PortEntity>> GetPortsBySourceIdAsync(string portSourceId);
        Task<List<PortEntity>> GetAllPortsAsync();
        Task<PortControlCommandDto> SendPortCommand(string sourceId,PortControlCommandDto command);
        Task SendPortStatusChangeReportAsync(PortStatusChangeReportDto portStatusChangeReport);
        Task<bool> UpdatePortAsync(PortEntity entity);
        Task<bool> UpdatePortsManyAsync(List<PortEntity> entitys);

        #endregion

        #region Unit 相关
        Task<UnitEntity> GetUnitByIdAsync(string id);
        Task<UnitEntity> GetUnitBySourceIdAsync(string sourceId);
        Task<List<UnitEntity>> GetUnitByInLineToolIdAsync(string inlineToolId);
        Task SendUnitStatusChangeReportAsync(UnitStatusChangeReportDto unitStatusChangeReport);
        #endregion

        #region InlineTool 相关
        Task<List<InlineToolEntity>> GetInlineToolsAsync();
        #endregion
    }
}
